<% def springSecurityService = application.getAttribute("org.codehaus.groovy.grails.APPLICATION_CONTEXT").getBean("springSecurityService") %>
<% def stringManagerService = application.getAttribute("org.codehaus.groovy.grails.APPLICATION_CONTEXT").getBean("stringManagerService") %>
<g:if test="${stringManagerService.checkObjectInString(postInstance,springSecurityService?.currentUser?.subscribe)}">
  <g:remoteLink controller="post" action="unSubscribe" id="${postInstance?.id}" update="show_subscribe${postInstance?.id}"><input type="image" src="${resource(dir: 'images', file: 'rss_icon.png')}" title="unsubscribe"></g:remoteLink>
</g:if><g:else>
  <g:remoteLink controller="post" action="subscribe" id="${postInstance?.id}" update="show_subscribe${postInstance?.id}"><input type="image" src="${resource(dir: 'images', file: 'un_rss_icon.png')}" title="subscribe"></g:remoteLink>
</g:else>